package com.ling.pl.security.feign;

import com.ling.pl.core.commons.support.DaoPage;
import com.ling.pl.security.model.DefaultPositionVO;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;
/**
 * @author bo.wang
 */
public interface BaseDefaultPositionService {

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public List<DefaultPositionVO> findDefaultPositionByList(@RequestParam Map params) throws Exception;

    /**
     * 分页列出
     */
    @RequestMapping(value = "/findByPage", method = RequestMethod.GET)
    public DaoPage findDefaultPositionByPage(@RequestParam Map params) throws Exception;

    /**
     * 新建一个
     */
    @RequestMapping(value = "/", method = RequestMethod.POST)
    public DefaultPositionVO create(@RequestBody DefaultPositionVO defaultPositionVO);

    /**
     * 获取单个
     */
    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public DefaultPositionVO findById(@PathVariable("id") String id);

    /**
     * 更新某个指定的实体
     */
    @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
    public DefaultPositionVO update(@PathVariable("id") String id, @RequestBody DefaultPositionVO defaultPositionVO);

    /**
     * 更新指定主键数据（提供部分信息）
     */
    @RequestMapping(value = "/{ids_}", method = RequestMethod.PATCH)
    public void updatePatch(@PathVariable("ids_") String ids_, @RequestBody Map defaultPositionVO);

    /**
     * 删除某个
     */
    @RequestMapping(value = "/{ids_}", method = RequestMethod.DELETE)
    public void delete(@PathVariable("ids_") String ids_);

    /**
     * 保存带状态的Map数据集合
     */
    @RequestMapping(value = "/saveMap", method = RequestMethod.POST)
    public void saveMap(@RequestBody Map<String, List<DefaultPositionVO>> dataListsMap);

    /**
     * 保存数据集合
     */
    @RequestMapping(value = "/saveAll", method = RequestMethod.POST)
    public void saveAll(@RequestBody List<DefaultPositionVO> dataLists);

}

